<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%>																			
<%@ include file="/WEB-INF/view/jsp/base.jsp" %>																																			
<html lang="en">
<head>
<style>
	.width{width: 206px;}
	input{-moz-box-sizing: border-box; }
</style>
</head>																																												
<body class="wysihtml5-supported">																																							
	<div id="content">																																										
		<div class="container-fluid">																																							
			<div class="row-fluid">																																							
				<div class="span12">																																							
					<div class="widget-box">																																					
						<div class="widget-title">																																			
							<h5>表单</h5>																																							
						</div>																																									
						<div class="widget-content nopadding">																																
							<form id="ibpEventLogDataForm" action="" method="post" class="form-horizontal">																					
									<div class="flexbox">																																
							    		<div class="flex-item">	
											<label>日期时间 :</label>																															
											   	<input  primaryKey="true"  type="text" class="date" name="dateTime" placeholder="" style="width:120px;" size="10"  maxlength="10">
												<span class="error_msg" name="error_dateTime"></span>
										</div>		
							    		<div class="flex-item">	
											<label>日期 :</label>																															
												<input  type="text" class="" name="ymd" placeholder="" size="10"  maxlength="10">
												<span class="error_msg" name="error_ymd"></span>
										</div>		
									</div>	
									<div class="flexbox">																																
							    		<div class="flex-item">	
											<label>时分秒 :</label>																															
												<input  type="text" class="" name="hms" placeholder="" size="8"  maxlength="8">
												<span class="error_msg" name="error_hms"></span>
										</div>		
							    		<div class="flex-item">	
											<label>年 :</label>																															
												<input  type="text" class="" name="year" placeholder="" size="4"  maxlength="4">
												<span class="error_msg" name="error_year"></span>
										</div>		
									</div>	
									<div class="flexbox">																																
							    		<div class="flex-item">	
											<label>月 :</label>																															
												<input  type="text" class="" name="month" placeholder="" size="2"  maxlength="2">
												<span class="error_msg" name="error_month"></span>
										</div>		
							    		<div class="flex-item">	
											<label>日 :</label>																															
												<input  type="text" class="" name="day" placeholder="" size="2"  maxlength="2">
												<span class="error_msg" name="error_day"></span>
										</div>		
									</div>	
									<div class="flexbox">																																
							    		<div class="flex-item">	
											<label>周（年初开始算） :</label>																															
												<input  type="text" class="" name="week" placeholder="" size="2"  maxlength="2">
												<span class="error_msg" name="error_week"></span>
										</div>		
							    		<div class="flex-item">	
											<label>时 :</label>																															
												<input  type="text" class="" name="hh" placeholder="" size="2"  maxlength="2">
												<span class="error_msg" name="error_hh"></span>
										</div>		
									</div>	
									<div class="flexbox">																																
							    		<div class="flex-item">	
											<label>分 :</label>																															
												<input  type="text" class="" name="mm" placeholder="" size="2"  maxlength="2">
												<span class="error_msg" name="error_mm"></span>
										</div>		
							    		<div class="flex-item">	
											<label>秒 :</label>																															
												<input  type="text" class="" name="ss" placeholder="" size="2"  maxlength="2">
												<span class="error_msg" name="error_ss"></span>
										</div>		
									</div>	
									<div class="flexbox">																																
							    		<div class="flex-item">	
											<label>整10秒 :</label>																															
												<input  type="text" class="" name="m10" placeholder="" size="1"  maxlength="1">
												<span class="error_msg" name="error_m10"></span>
										</div>		
							    		<div class="flex-item">	
											<label>整10分 :</label>																															
												<input  type="text" class="" name="s10" placeholder="" size="1"  maxlength="1">
												<span class="error_msg" name="error_s10"></span>
										</div>		
									</div>	
									<div class="flexbox">																																
							    		<div class="flex-item">	
											<label>日志类型（T-交易日志<trade> O-其他日志<other>） :</label>																															
												<input  type="text" class="" name="logType" placeholder="" size="1"  maxlength="1">
												<span class="error_msg" name="error_logType"></span>
										</div>		
									</div>	
									<div class="flexbox">																																
							    		<div class="flex-item">	
											<label>日志级别 :</label>																															
												<input  type="text" class="" name="logLevel" placeholder="" size="50"  maxlength="50">
												<span class="error_msg" name="error_logLevel"></span>
										</div>		
									</div>
									<div class="flexbox">																																
							    		<div class="flex-item">	
											<label>进程名 :</label>																															
												<input  type="text" class="" name="processName" placeholder="" size="50"  maxlength="50">
												<span class="error_msg" name="error_processName"></span>
										</div>		
									</div>
									<div class="flexbox">																																
							    		<div class="flex-item">	
											<label>进程id :</label>																															
												<input  type="text" class="" name="processId" placeholder="" size="50"  maxlength="50">
												<span class="error_msg" name="error_processId"></span>
										</div>		
									</div>
									<div class="flexbox">																																
							    		<div class="flex-item">	
											<label>客户端通讯节点名 :</label>																															
												<input  type="text" class="" name="clinetNodeName" placeholder="" size="50"  maxlength="50">
												<span class="error_msg" name="error_clinetNodeName"></span>
										</div>		
									</div>
									<div class="flexbox">																																
							    		<div class="flex-item">	
											<label>客户端通讯节点地址 :</label>																															
												<input  type="text" class="" name="clinetNodeAddress" placeholder="" size="50"  maxlength="50">
												<span class="error_msg" name="error_clinetNodeAddress"></span>
										</div>		
									</div>
									<div class="flexbox">																																
							    		<div class="flex-item">	
											<label>服务端通讯节点名 :</label>																															
												<input  type="text" class="" name="serverNodeName" placeholder="" size="50"  maxlength="50">
												<span class="error_msg" name="error_serverNodeName"></span>
										</div>		
									</div>
									<div class="flexbox">																																
							    		<div class="flex-item">	
											<label>服务端通讯节点地址 :</label>																															
												<input  type="text" class="" name="serverNodeAddress" placeholder="" size="50"  maxlength="50">
												<span class="error_msg" name="error_serverNodeAddress"></span>
										</div>		
									</div>
									<div class="flexbox">																																
							    		<div class="flex-item">	
											<label>交易码 :</label>																															
												<input  type="text" class="" name="tradeCode" placeholder="" size="50"  maxlength="50">
												<span class="error_msg" name="error_tradeCode"></span>
										</div>		
									</div>
									<div class="flexbox">																																
							    		<div class="flex-item">	
											<label>交易描述 :</label>																															
												<input  type="text" class="" name="tradeDescribe" placeholder="" size="50"  maxlength="50">
												<span class="error_msg" name="error_tradeDescribe"></span>
										</div>		
									</div>
									<div class="flexbox">																																
							    		<div class="flex-item">	
											<label>通讯响应码 :</label>																															
												<input  type="text" class="" name="communicateResponseCode" placeholder="" size="50"  maxlength="50">
												<span class="error_msg" name="error_communicateResponseCode"></span>
										</div>		
									</div>
									<div class="flexbox">																																
							    		<div class="flex-item">	
											<label>交易总耗时 :</label>																															
												<input  type="text" class="" name="tradeTotalTime" placeholder="" size="22"  maxlength="22">
												<span class="error_msg" name="error_tradeTotalTime"></span>
										</div>		
							    		<div class="flex-item">	
											<label>交易保持耗时 :</label>																															
												<input  type="text" class="" name="tradeKeepTime" placeholder="" size="22"  maxlength="22">
												<span class="error_msg" name="error_tradeKeepTime"></span>
										</div>		
									</div>	
									<div class="flexbox">																																
							    		<div class="flex-item">	
											<label>通讯接收耗时 :</label>																															
												<input  type="text" class="" name="communicateReceiveTime" placeholder="" size="22"  maxlength="22">
												<span class="error_msg" name="error_communicateReceiveTime"></span>
										</div>		
							    		<div class="flex-item">	
											<label>应用处理耗时 :</label>																															
												<input  type="text" class="" name="appcationProcessTime" placeholder="" size="22"  maxlength="22">
												<span class="error_msg" name="error_appcationProcessTime"></span>
										</div>		
									</div>	
									<div class="flexbox">																																
							    		<div class="flex-item">	
											<label>通讯发送耗时 :</label>																															
												<input  type="text" class="" name="communicateSendTime" placeholder="" size="22"  maxlength="22">
												<span class="error_msg" name="error_communicateSendTime"></span>
										</div>		
							    		<div class="flex-item">	
											<label>交易处理耗时 :</label>																															
												<input  type="text" class="" name="tradeProcessTime" placeholder="" size="22"  maxlength="22">
												<span class="error_msg" name="error_tradeProcessTime"></span>
										</div>		
									</div>	
									<div class="flexbox">																																
							    		<div class="flex-item">	
											<label>日志信息（非交易日志，未分割） :</label>																															
										    	<textarea type="text" class="" name="paraDesc" placeholder="" style="width:868px;" size="2,048"  maxlength="2,048"></textarea>
												<span class="error_msg" name="error_logInfo"></span>
										</div>		
									</div>
								<div class="form-actions">																																	
									<button id="id_add" type="button" class="btn btn-success f-right"  style="float:right;margin-left:10px;" onclick="save()">保存</button>											 
 									<button id="id_cancel" type="button" class="btn btn-info f-right"  style="float:right;margin-left:10px;" onclick="cancle()">取消</button>	
								</div>																																							
							</form>																																								
						</div>																																									
					</div>																																										
				</div>																																											
			</div>																																												
		</div>																																													
	</div>		
			<div id="modelDialog" class="modal hide fade in" style="display:none;">
		<div class="modal-header">
			<a class="close" data-dismiss="modal">x</a>
			<h4>操作提示</h4>
		</div>
		<div class="modal-body">
			<h4>确认删除该项记录吗？</h4>
		</div>
		<div class="modal-body">
			<button id="confirm" type="button" class="btn btn-success">确认</button>
			<button  type="button class="btn btn-default" data-dismiss="modal">关闭</button>
		</div>
	</div>																																													
	<script>																																													
	    var params = mainParam.param;   //接收传来的参数																																							
	    var _pageNum = "" ;  //接收list页面传来的当面页数																																				
		//初始化表单数据																																												
		$(document).ready(function(){																																							
			$('.date').datetimepicker({
				language:'zh-CN',
				format:'yyyy-mm-dd',
				minView:"month",
				initialDate:new Date(),
				autoclose:true,
				todayBtn:true
			});
			
			_pageNum = "${param.pageNum}" ;																																					
			if(!$.isEmptyObject(params)){																																						
				$("input[primaryKey='true']").attr("readonly","readonly");																												
				$("#id_cancel").css("display","block");
				$.ajax({																																										
					url:"<%=path%>/ibpEventLogData/get",																																			
				    data:params,																																						
				    type:"post",																																								
				    success:function(text){																																						
				    	if(text.success){																																						
				    		$("#ibpEventLogDataForm").autofill(text.data);																															
				    	}																																										
				    }																																											
				});																																												
			}																																													
		});																																														
		//保存表单数据																																												
		function save(){																																										
			var _editType = null ;																																								
			if(!$.isEmptyObject(params)){																																						
				_editType = "edit";																																							
				$("#ibpEventLogDataForm").prop("action","<%=path %>/ibpEventLogData/update");																					
			}else{																																												
				_editType = "add";																																							
				$("#ibpEventLogDataForm").prop("action","<%=path %>/ibpEventLogData/add");																						
			}																																													
			//保存																																												
			$("#ibpEventLogDataForm").ajaxSubmit(function(text){																															
			    C.handleError($("#ibpEventLogDataForm"),text.error);
			    C.gritter(text.message);
			    if(text.success){																																								
			    	if(_editType == "edit"){																																					
			    		cancle(); //返回原页面																																			
			    	}else if(_editType == "add"){																																				
						var $form = $("#ibpEventLogDataForm");
						toLoad("<%=path %>/ibpEventLogData/detail",$form.serialize());																																					
			    	}																																											
				}																																												
			});																																													
		}		
		
		
		//输入金额类型数据
		$(".moneyNum").keyup(function(){
			var reg=$(this).val().match(/\d+\.?\d{0,2}/);
			var txt = '';
			if(reg!=null){
				txt=reg[0];
			}
			$(this).val(txt);
		}).change(function(){
			$(this).keypress();
			var v=$(this).val();
			if(/\.$/.test(v)){
				$(this).val(v.substr(0,v.length-1));
			}
		})
		
																																														
	</script>																																													
</body>																																														
 </html>	    																																												

